package com.heying.springbootweb.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@NoArgsConstructor//无参构造器
@AllArgsConstructor//生成带有参数的构造器
public class Student {

    private Integer id;

    private String stuno;

    private String name;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date birth;

    private Integer sex;

    private Integer country;//0-中国，1-美国，2-德国

    private String hobby;

    private Integer tid;//班主任id
}
